Manually flush headings for keybindings
authorIqbal Ansari <iqbalansari02@yahoo.com>
Sat, 10 Oct 2015 13:08:08 +0000 (18:38 +0530)
committerIqbal Ansari <iqbalansari02@yahoo.com>
Fri, 13 Nov 2015 17:10:05 +0000 (22:40 +0530)
which-key.el

index 14fc5b050d44a6346cd3c749761448ac85bb1fe5..7e07631e7b40e4060a06c4aa46483e566fd3dda9 100644 (file)
@@ -1262,6 +1262,7 @@ BUFFER that follow the key sequence KEY-SEQ."
                              ;; C-x 8           Prefix Command
                              ;; <S-dead-acute>  Prefix Command
                              "^\\([^ <>\t]+\\|<f[0-9]+>\\)[ \t]+\\([^\t\n]+\\)$"))
+         (lines-to-flush'("[bB]inding[s]?[:]?$" "translations:$" "-------$"))
          key-match desc-match unformatted)
     (save-match-data
       (with-temp-buffer
@@ -1269,6 +1270,9 @@ BUFFER that follow the key sequence KEY-SEQ."
         (when which-key-hide-alt-key-translations
           (goto-char (point-min))
           (flush-lines "^A-"))
+        (goto-char (point-min))
+        (dolist (line-to-flush lines-to-flush)
+          (save-excursion (flush-lines line-to-flush)))
         (goto-char (point-max)) ; want to put last keys in first
         (while (re-search-backward keybinding-regex nil t)
           (setq key-match (match-string 1)